import { saveXiuShuLiHun } from '../../../api/user'
Page({
  data: {
    content: ''
  },

  onLoad: function (options) {
    this.setData({
      content: options.content
    })
  },

  onblur(e) {
    this.setData({
      content: e.detail.value
    })
  },

  done(e) {
    const pages = getCurrentPages();
    let prevPage = pages[pages.length - 2];
    saveXiuShuLiHun({ motto: this.data.content }).then(res => {
      prevPage.setData({
        content: this.data.content
      })
      wx.navigateBack({
        delta: 1,
      })
    })
  }

})
